Using onlySettings property in a content type
The onlySetting
property indicates that a content type is meant for settings only.
For instance, you might use this attribute for content types that do not require storefront content, such as an SEO page.
Image 1 | Image 2 |
---|---|
![]() | ![]() |
Image 1 - Content type without onlySettings and with two tabs: Sections and SEO. | Image 2 - Content type with onlySettings and with one tab for settings: SEO. |
This property ensures that the content type's page displays only the available settings without the Section tab.
Follow the steps below to use the onlySettings
property for your desired content type.
Step-by-step​
- Go to the store's repository and access
CMS
>content-types.json
. - Choose your desired content type and add the
onlySettings
property astrue
. For example:
{
"id": "SEO",
"name": "Global SEO Settings",
"onlySettings": true,
"configurationSchemaSets": [
{
"name": "SEO",
"configurations": [
...
]
}
]
}
- Sync your changes in the
CMS
folder by running the following command:
vtex cms sync
After syncing your changes, go to your store's Admin and select Storefront > Headless CMS. Then, navigate to the content type to which you added the property and ensure the only tab available is for settings.